package com.mi.system.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Log VO
 *
 * @author jin_huaquan
 * @version 1.0
 * @date 2021/11/3 14:02
 */
@ApiModel(value = "LogVO对象", description = "操作日志信息")
@Data
public class LogVO implements Serializable {

    @ApiModelProperty(value = "操作日志记录ID", required = true, dataType = "java.lang.String")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "日志类型 @enum LogType[0(正常),9(错误)]", required = true)
    private String type;

    @ApiModelProperty(value = "用户账号", required = true)
    private String username;

    @ApiModelProperty(value = "日志标题", required = true)
    private String title;

    @ApiModelProperty(value = "操作IP地址", required = true)
    private String remoteAddr;

    @ApiModelProperty(value = "浏览器类型", required = true)
    private String userAgent;

    @ApiModelProperty(value = "请求URI", required = true)
    private String requestUri;

    @ApiModelProperty(value = "请求方式", required = true)
    private String httpMethod;

    @ApiModelProperty(value = "方法执行时间", required = true)
    private Long executionTime;

    @ApiModelProperty("异常堆栈")
    private String exception;

    @ApiModelProperty("应用标识")
    private String serviceId;

    @ApiModelProperty(value = "操作时间", required = true)
    private LocalDateTime createTime;
}
